package com.stylefeng.guns.modular.goods.service.impl;

import com.google.common.collect.Lists;
import com.stylefeng.guns.common.SelectValue;
import com.stylefeng.guns.modular.goods.model.Brand;
import com.stylefeng.guns.modular.goods.dao.BrandMapper;
import com.stylefeng.guns.modular.goods.service.IBrandService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 品牌表 服务实现类
 * </p>
 *
 * @author wuyifie
 * @since 2018-09-05
 */
@Service
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements IBrandService {
    @Override
    public List<SelectValue> listOption() {
        List<SelectValue> list = Lists.newArrayList();
        for (Brand brand : selectList(null)) {
            list.add(new SelectValue(brand.getId(),brand.getBrandName()));
        }
        return list;
    }
}
